package com.banma.common.utils;

import java.util.HashMap;
import java.util.Map;
/**
 * 
 *  消息常量类
 *
 * <pre>
 * Pattern : Value Object
 * Thread Safe : No
 *
 * Change History
 *
 * Name                 Date                    Description
 * -------              -------                 -----------------
 * Banma              2016-08-30            Create the class
 *
 * </pre>
 *
 * @author Banma
 * @version 1.0
 */
public class AlertConstants {
	//tbresources package
    public final static String TBRESOURCES_PACKAGE_MESSAGE = "message";
    public final static String TBRESOURCES_PACKAGE_WEB = "web";
    
	//message id
    public final static String TBRESOURCES_MESSAGE_ID_SYSTEM_ERROR = "message.system.error"; //系统错误
    public final static String TBRESOURCES_MESSAGE_ID_SUCCESS = "message.system.sucess";  //操作成功
    public final static String TBRESOURCES_MESSAGE_ID_FAILURE = "message.system.failure"; //操作失败
    public final static String TBRESOURCES_MESSAGE_ID_NO_RIGHTS = "message.system.no.rights"; //没有操作权限
    public final static String TBRESOURCES_MESSAGE_ID_PARAMETER_ERROR = "message.system.parameter.error"; //参数错误
    public final static String TBRESOURCES_MESSAGE_ID_NO_EXIST_OBJECT = "message.system.no.exist.object"; //操作对象不存在
    public final static String TBRESOURCES_MESSAGE_ID_ALREADY_EXIST_OBJECT = "message.system.already.exist.object"; //新增对象已存在
    public final static String TBRESOURCES_MESSAGE_ID_DOWNLOAD_NO_DATA = "message.system.download.no.data"; //下载数据不存在
    public final static String TBRESOURCES_MESSAGE_ID_URL_NOT_SAFE = "base.message.system.url.not.safe"; //URL不安全
    public final static String TBRESOURCES_MESSAGE_ID_VISIT_SERVER_ERROR = "message.system.visit.server.error"; //访问服务器失败
    public final static String TBRESOURCES_MESSAGE_ID_CONNECT_SERVER_ERROR = "message.system.connect.server.error"; //连接服务器失败

    
    public final static String TBRESOURCES_MESSAGE_ID_UPLOAD_SIZE_EXCEED = "message.system.upload.size.exceed"; //上传文件最大不得超过{0}字节
    public final static String TBRESOURCES_MESSAGE_ID_URL_ERROR = "message.system.url.error"; //URL错误
    public final static String TBRESOURCES_MESSAGE_ID_NEED_LOGIN = "message.system.need.login"; //请登录后使用该功能
    public final static String TBRESOURCES_MESSAGE_ID_IS_DEVELOPING = "message.system.is.developing"; //该功能正在开发当中
    
    
    
    
    public final static String URL_START_FORWARD = "forward:";
	public final static String URL_START_REDIRECT = "redirect:";
	
	public final static String ALERT_ERROR_ID = "alertErrorId";
	public final static String ALERT_ARGUMENTS = "alertArguments";

    //alert message , then go page
    public final static String SYSTEM_ALERT_GOPAGE_INDEX = "index";
    public final static String SYSTEM_ALERT_GOPAGE_BACK = "back";
    public final static String SYSTEM_ALERT_GOPAGE_CLOSE = "close";
    public final static String SYSTEM_ALERT_GOPAGE_LOGOUT = "logout";
    public final static String SYSTEM_ALERT_GOPAGE_WELCOME = "welcome";
    public final static String SYSTEM_ALERT_GOPAGE_CLOSE_DIALOG = "closedialog";
    public final static String SYSTEM_ALERT_GOPAGE_CLOSE_WINDOW = "closewindow";
    
    public final static Map<String,String> ALERT_PAGE_BUTTON_MAP = new HashMap<String,String>();
    static{
    	ALERT_PAGE_BUTTON_MAP.put(SYSTEM_ALERT_GOPAGE_INDEX, "base.web.alert.button.index");
    	ALERT_PAGE_BUTTON_MAP.put(SYSTEM_ALERT_GOPAGE_BACK, "base.web.alert.button.back");
    	ALERT_PAGE_BUTTON_MAP.put(SYSTEM_ALERT_GOPAGE_CLOSE, "base.web.alert.button.close");
    	ALERT_PAGE_BUTTON_MAP.put(SYSTEM_ALERT_GOPAGE_LOGOUT, "base.web.alert.button.logout");
    	ALERT_PAGE_BUTTON_MAP.put(SYSTEM_ALERT_GOPAGE_WELCOME, "base.web.alert.button.home");
    	ALERT_PAGE_BUTTON_MAP.put(SYSTEM_ALERT_GOPAGE_CLOSE_DIALOG, "base.web.alert.button.close");
    	ALERT_PAGE_BUTTON_MAP.put(SYSTEM_ALERT_GOPAGE_CLOSE_WINDOW, "base.web.alert.button.close");
    }
    
    //刷新父窗口
    public final static String PARENT_REFRESH = "PARENT_REFRESH";
    
    //use in url parameter
    public static final String SPLIT_URL_ADDRESS="*";
}
